package bairui.international.console.web.controller.ueditor;

import org.springframework.stereotype.Controller;

@Controller
public class UEditorConfig {
 
//    @Value(value="classpath:config.json")
//    private Resource resource;
// 
//    @GetMapping("/ueconfig")
//    public void getUEConfig(HttpServletRequest request, HttpServletResponse response) {
//        org.springframework.core.io.Resource res = new ClassPathResource("config.json");
//        response.setHeader("Content-Type" , "text/html");
//        try {
//            BufferedReader br = new BufferedReader(new InputStreamReader(resource.getInputStream()));
//            StringBuffer message=new StringBuffer();
//            String line = null;
//            while((line = br.readLine()) != null) {
//                message.append(line);
//            }
//            String result = message.toString().replaceAll("/\\*(.|[\\r\\n])*?\\*/","");
//            JSONObject json = JSONObject.fromObject(result);
//            System.out.println(result + "======result======" + json.toString());
//            PrintWriter out = response.getWriter();
//            out.print(json.toString());
//        } catch (IOException e) {
//            e.printStackTrace();
//        }
//    }

}